package com.act;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ToggleButton;

public class MainActivty extends Activity implements OnClickListener{
	
	/** 是否开启推送  */
	private ToggleButton toggleBtn = null;
	/** 关于界面  **/
	private Button aboutBtn = null;
	/** 微博分享界面  **/
	private Button shareBtn = null;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        toggleBtn = (ToggleButton)findViewById(R.id.toggleButton1);
        aboutBtn = (Button)findViewById(R.id.btn_about);
        shareBtn = (Button)findViewById(R.id.btn_share);
        
        aboutBtn.setOnClickListener(this);
        shareBtn.setOnClickListener(this);
        
    }

	@Override
	public void onClick(View v) {
		
		Intent intent = new Intent();
		switch(v.getId())
		{
		case R.id.btn_about:
			intent.setClass(this, AppAboutActivity.class);
			startActivity(intent);
			break;
		case R.id.btn_share:
			intent.setClass(this, ShareWeiboActivity.class);
			startActivity(intent);
			break;
		}
	}
}